<page-header-wrapper [title]="'短信模板'"></page-header-wrapper>

<nz-card>
    <div class="filter-wrap">
        <button nz-button nzType="primary" (click)="add()" acl [acl-ability]="['SMS_TEMPLATE-add']">新增</button>
        <button nz-button nzType="primary" (click)="open()"><i nz-icon nzType="plus" nzTheme="outline"></i>筛选</button>
    </div>
    <st #st [data]="this.service.$api_smsTemplate_page " [columns]="columns" [req]="{ process: beforeReq }"
        [loading]="false" [page]="{}"></st>
</nz-card>

<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="720" [nzVisible]="visible"
    nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="close()">
    <div *nzDrawerContent>
        <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
            [button]="'none'"></sf>
    </div>

    <ng-template #footerTpl>
        <div style="float: right">
            <button nz-button style="margin-right: 8px;" (click)="close()">取消</button>
            <button nz-button nzType="primary" (click)="search()">确认</button>
        </div>
    </ng-template>
</nz-drawer>

<nz-modal [(nzVisible)]="isVisible" [nzTitle]="!isEdit?'新增':'编辑'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"
    [nzOkDisabled]="!sfEdit?.valid">
    <ng-container *nzModalContent>
        <sf #sfEdit [formData]="tempData" [schema]="editSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}"
            [compact]="true" [button]="'none'"></sf>
    </ng-container>
</nz-modal>